package com.kateba.android.utils;

import android.content.Context;
import android.graphics.Typeface;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.kateba.android.blueinput.Singleton;


class CustomAdapterView extends LinearLayout
{
  public CustomAdapterView(Context paramContext, ListViewItem paramListViewItem)
  {
    super(paramContext);
    int i = Singleton.getInstance().applySCRDensity(paramContext, 4);
    setId(paramListViewItem.getDeviceID());
    int j = 0;
    if ((paramListViewItem.getDeviceType() == 0) && (paramListViewItem.getDeviceStatus()))
      j = 2130837507;
    if ((paramListViewItem.getDeviceType() == 0) && (!paramListViewItem.getDeviceStatus()))
      j = 2130837506;
    if ((paramListViewItem.getDeviceType() == 1) && (paramListViewItem.getDeviceStatus()))
      j = 2130837509;
    if ((paramListViewItem.getDeviceType() == 1) && (!paramListViewItem.getDeviceStatus()))
      j = 2130837508;
    if (paramListViewItem.getDeviceStatus());
    for (int k = 2131034158; ; k = 2131034159)
    {
      setBackgroundResource(2130837520);
      setOrientation(0);
      setPadding(0, i, 0, i);
      setGravity(16);
      LinearLayout localLinearLayout1 = new LinearLayout(paramContext);
      localLinearLayout1.setOrientation(1);
      LinearLayout.LayoutParams localLayoutParams = new LinearLayout.LayoutParams(-2, -2);
      localLayoutParams.setMargins(i, 0, i, 0);
      addView(localLinearLayout1, localLayoutParams);
      ImageView localImageView = new ImageView(paramContext);
      localImageView.setImageDrawable(paramContext.getResources().getDrawable(j));
      localLinearLayout1.addView(localImageView);
      TextView localTextView1 = new TextView(paramContext);
      localTextView1.setTextSize(2, 10.0F);
      localTextView1.setTypeface(Typeface.DEFAULT, 0);
      localTextView1.setTextColor(Singleton.clrText);
      localTextView1.setText(paramContext.getResources().getString(k));
      localLinearLayout1.addView(localTextView1);
      LinearLayout localLinearLayout2 = new LinearLayout(paramContext);
      localLinearLayout2.setOrientation(1);
      addView(localLinearLayout2, new LinearLayout.LayoutParams(-1, -2));
      TextView localTextView2 = new TextView(paramContext);
      localTextView2.setTextSize(2, 16.0F);
      localTextView2.setTypeface(Typeface.DEFAULT, 1);
      localTextView2.setTextColor(Singleton.clrText);
      localTextView2.setText(paramListViewItem.getDeviceName());
      localLinearLayout2.addView(localTextView2);
      TextView localTextView3 = new TextView(paramContext);
      localTextView3.setTextSize(2, 16.0F);
      localTextView3.setTextColor(Singleton.clrSubText);
      localTextView3.setText(paramListViewItem.getDeviceAddress());
      localLinearLayout2.addView(localTextView3);
      return;
    }
  }
}